import java.util.Scanner;

public class Test {
    public static void main(String[] args){
        Scanner scanner=new Scanner(System.in);
        int a =scanner.nextInt();
        int b =scanner.nextInt();
        for(int i=(a>b?b:a);i>0;i--){
            if(a%i==0&&b%i==0){
                System.out.println("这两个数的最大公约数是"+i);
                break;
            }
        }
    }
}
